Skip to content

fix(ci): tagging#22

Merged
ErnestM1234 merged 2 commits intomainfrom
e/ci/fix-deployments
Mar 9, 2026
Merged

fix(ci): tagging#22
ErnestM1234 merged 2 commits intomainfrom
e/ci/fix-deployments

Conversation

@ErnestM1234
Copy link
Contributor

@ErnestM1234 ErnestM1234 commented Mar 9, 2026

The checkout action by default does not fetch the tags. This breaks our filtering logic leading to releases failing trying to republish unreleased tags.

Greptile Summary

This PR fixes a bug in the publish CI job where actions/checkout@v4 was not fetching existing git tags. Without tags present locally, the git tag -l "$tag" | grep -q . guard condition always evaluated to true, causing every package to be treated as newly released and potentially re-published on each run.

  • Root cause fix (.github/workflows/release.yml): Adds fetch-tags: true to the checkout step in the publish job so that all existing tags are available when the workflow checks whether a package version has already been tagged and released.
  • Changeset (.sampo/changesets/haughty-thunderbearer-tuoni.md): Records a patch bump for all seven managed packages to document this CI-level fix through the release tooling.

Confidence Score: 5/5

  • This PR is safe to merge — it is a minimal, targeted one-line CI fix with no production code changes.
  • The change adds a single well-understood option (fetch-tags: true) to the correct checkout step, directly addressing the described bug. The combination of fetch-depth: 2 (needed for HEAD~1 diffing) and fetch-tags: true (needed for tag existence checks) is correct. No logic is altered; the fix only ensures the prerequisite data is available.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/release.yml Adds fetch-tags: true to the publish job's checkout step so that existing tags are available when filtering which packages need to be tagged and published.
.sampo/changesets/haughty-thunderbearer-tuoni.md New changeset file recording a patch-level bump for all seven PyPI packages to document the CI tagging fix.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub Push (main)
    participant PJ as publish job
    participant CO as actions/checkout@v4
    participant GIT as git (local)
    participant GHR as GitHub Releases / Tags
    participant PY as PyPI

    GH->>PJ: trigger on push to main
    PJ->>CO: checkout (fetch-depth: 2, fetch-tags: true)
    CO->>GIT: fetch last 2 commits + ALL existing tags
    PJ->>GIT: git diff HEAD~1 pyproject.toml (check version changes)
    alt version changed
        loop for each package
            PJ->>GIT: git tag -l "name@version"
            alt tag does NOT exist (new release)
                PJ->>GIT: git tag "name@version"
                PJ->>GHR: git push --tags
                PJ->>GHR: gh release create
            else tag already exists (previously released)
                PJ-->>PJ: skip (no duplicate publish)
            end
        end
        PJ->>PY: uv publish dist/*
    end
Loading

Last reviewed commit: 0176bc0

@ErnestM1234 ErnestM1234 changed the title fix(ci): ci taggging fix(ci): tagging Mar 9, 2026
@ErnestM1234 ErnestM1234 enabled auto-merge (squash) March 9, 2026 19:41
@ErnestM1234 ErnestM1234 merged commit 900d906 into main Mar 9, 2026
8 checks passed
@ErnestM1234 ErnestM1234 deleted the e/ci/fix-deployments branch March 9, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants